package com.example.pointkeeper;

import java.io.Serializable;
import java.util.ArrayList;

import junit.framework.TestSuite;

import br.ufc.great.model.Point;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TextView;

public class ShowPoints extends Activity {
	
	Bundle b;
	ArrayList<Point> pts;
	TextView tv;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_show_points);
		b = this.getIntent().getExtras();
		pts = b.getParcelableArrayList("points");
		tv = (TextView)findViewById(R.id.textViewShowLatLong);
		tv.setText("Points:");
		for (Point p : pts){
			tv.setText(tv.getText() + "Lat:" + p.getLatitude() + "Long:" + p.getLongitude());
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.show_points, menu);
		return true;
	}
	

}
